//
//  NSObject+BusinessLogic.h
//  BukaLive
//
//  Created by 曹飞 on 2017/1/8.
//  Copyright © 2017年 曹飞. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <WebKit/WebKit.h>



@interface NSObject (BusinessLogic)



//上一页
+(void)callJsPrevious:(WKWebView*)webView;

//下一页
+(void)callJsNext:(WKWebView*)webView;

//跳页
+(void)callJsJump:(WKWebView*)webView
         withPage:(NSString*)page
         withStep:(NSString*)step;

//画笔还原
+(void)callJsAction:(WKWebView*)webView
         withAction:(NSString*)action;

//设置ppt总页数 在翻页之前设置
+(void)callJsPage:(WKWebView*)webView
    withPageCount:(NSString*)pageCount;


//切换到第几页（画笔和ppt现在是独立的）默认是第一页
+(void)callJsPage:(WKWebView*)webView
         withPage:(NSString*)page;

//打开画笔
+(void)callJsBrushOpen:(WKWebView*)webView;

//荧光笔
+(void)callJsLightPen:(WKWebView*)webView
              withRed:(CGFloat)red
            withGreen:(CGFloat)green
             withBlue:(CGFloat)blue
            withWidth:(CGFloat)width NS_DEPRECATED_IOS(2_0, 2_0, "颜色在B端无法展现，Use - +(void)callJsLightPen:withColorName:withWidth:");

//编辑移动画笔
+(void)callJsBrushEdit:(WKWebView*)webView;
//关闭画笔
+(void)callJsBrushClose:(WKWebView*)webView;

//画笔，颜色用16进制
+(void)callJsBrush:(WKWebView*)webView
       withColor16:(NSString*)color16
         withWidth:(CGFloat)width NS_DEPRECATED_IOS(2_0, 2_0, "颜色在B端无法展现，Use - +(void)callJsBrush:withColorName:withWidth:");

//画笔
+(void)callJsBrush:(WKWebView*)webView
           withRed:(CGFloat)red
         withGreen:(CGFloat)green
          withBlue:(CGFloat)blue
         withAlpha:(CGFloat)alpha
         withWidth:(CGFloat)width NS_DEPRECATED_IOS(2_0, 2_0, "颜色在B端无法展现，Use - +(void)callJsBrush:withColorName:withWidth:");


//直线
+(void)callJsLine:(WKWebView*)webView
          withRed:(CGFloat)red
        withGreen:(CGFloat)green
         withBlue:(CGFloat)blue
        withAlpha:(CGFloat)alpha
        withWidth:(CGFloat)width NS_DEPRECATED_IOS(2_0, 2_0, "颜色在B端无法展现，Use - +(void)callJsLine:withColorName:withWidth:");


//可产生"矩形","长方形","正方形"等,用户灵活使用.
+(void)callJsRect:(WKWebView*)webView
          withRed:(CGFloat)red
        withGreen:(CGFloat)green
         withBlue:(CGFloat)blue
        withAlpha:(CGFloat)alpha
        withWidth:(CGFloat)width NS_DEPRECATED_IOS(2_0, 2_0, "颜色在B端无法展现，Use - +(void)callJsRect:withColorName:withWidth:");

//圆
+(void)callJsCircle:(WKWebView*)webView
            withRed:(CGFloat)red
          withGreen:(CGFloat)green
           withBlue:(CGFloat)blue
          withAlpha:(CGFloat)alpha
          withWidth:(CGFloat)width NS_DEPRECATED_IOS(2_0, 2_0, "颜色在B端无法展现，Use - +(void)callJsCircle:withColorName:withWidth:");


#pragma mark - new B端可以展现
+(void)callJsLightPen:(WKWebView*)webView
        withColorName:(NSString*)colorName
            withWidth:(CGFloat)width;

+(void)callJsBrush:(WKWebView*)webView
     withColorName:(NSString*)colorName
         withWidth:(CGFloat)width;


//直线
+(void)callJsLine:(WKWebView*)webView
    withColorName:(NSString*)colorName
        withWidth:(CGFloat)width;


//可产生"矩形","长方形","正方形"等,用户灵活使用.
+(void)callJsRect:(WKWebView*)webView
    withColorName:(NSString*)colorName
        withWidth:(CGFloat)width;

//圆
+(void)callJsCircle:(WKWebView*)webView
      withColorName:(NSString*)colorName
          withWidth:(CGFloat)width;

//屏蔽键盘及点击翻页事件,0屏蔽,1放开,目前只应用于学生端,学生端不可点击翻页调用bukaFilp(0);
+(void)callJsFilp:(WKWebView*)webView
    withFilpNum:(NSString*)filpNum ;



//撤销
+ (void)callJsBack:(WKWebView*)webView;

//清屏
+ (void)callJsClear:(WKWebView*)webView;
//删除选中
+ (void)callJsDelete:(WKWebView*)webView;
//橡皮
+ (void)callJsWipe:(WKWebView*)webView;
//给对端发送消息
+(void)callJsBukaClicker:(WKWebView*)webView
             withJsonStr:(NSString*)json;
//向h5中添加图片
+(void)callJsAddImage:(WKWebView*)webView
         withImageURL:(NSString*)imageUrl;


//主动存储快照bukaSaveSnap()
+(void)callJsSaveSnap:(WKWebView*)webView;

//主动恢复快照
+(void)callJsRecoverySnap:(WKWebView*)webView;



@end
